package com.mashuai.utils.ztest.toolkit.mp;

import com.mashuai.utils.toolkit.core.msMp.MsDb;
import com.mashuai.utils.ztest.pb.bean.MsRoom;
import com.mashuai.utils.ztest.pb.bean.MsUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

/**
 * @ClassName: MpController
 * @Description:
 */
@RestController
@RequestMapping("/mp")
public class MpController {
    @Autowired
    private MsDictService service;

    @GetMapping("/save")
    public void save(){
        List<String> ids = Arrays.asList("b1f1r1", "b2f2r1");
        List<MsRoom> byIds = MsDb.getByIds(ids, MsRoom.class);
        System.err.println("--");
    }

    @GetMapping("/test")
    public void test(){
       //MsDb.au_columnValueValid("ms",MsUser::getCode,"用户名已存在", MsUser.class);
        List<MsUser> msList = MsDb.au_getList(MsUser.class, ew -> ew.eq(MsUser::getCode, "ms"));
        System.err.println(msList);
    }
}
